﻿using System;
using System.Collections;
using CSharp.Libs.Koc.Models;

namespace CSharp.Libs.Koc.KernelModels
{
    public class LogEntryEventArgs : EventArgs
    {
        private DateTime _EntryDateTime;
        private String _LogMessage = "";

        public LogEntryEventArgs(
            String LogMessage)
        {
            _EntryDateTime = DateTime.Now;
            _LogMessage = LogMessage;
        }

        public LogEntryEventArgs(
            DateTime EntryDateTime,
            String LogMessage)
        {
            _EntryDateTime = EntryDateTime;
            _LogMessage = LogMessage;
        }

        public DateTime EntryDateTime
        {
            get
            {
                return _EntryDateTime;
            }
        }

        public String LogMessage
        {
            get
            {
                return _LogMessage;
            }
        }
    }



    public class TaskEventArgs : EventArgs
    {
        private enmTaskAction _taAction = enmTaskAction.tskActUndefined;
        private String _strTaskMessage = "";

        public enum enmTaskAction
        {
            tskActUndefined = 1,
            tskActStarted,
            tskActWorking,
            tstActStopped,
            tskActDone
        }

        public TaskEventArgs(
            enmTaskAction taAction,
            String strTaskMessage)
        {
            _taAction = taAction;
            _strTaskMessage = strTaskMessage;
        }

        public enmTaskAction TaskAction
        {
            get
            {
                return _taAction;
            }
            set
            {
                _taAction = value;
            }
        }

        public String TaskMessage
        {
            get
            {
                return _strTaskMessage;
            }
            set
            {
                _strTaskMessage = value;
            }
        }
    }



    public class ReloadServerEventArgs : EventArgs
    {
        private Int32 _intServerId = 0;

        public ReloadServerEventArgs(
            Int32 ServerId)
        {
            _intServerId = ServerId;
        }

        public Int32 ServerId
        {
            get
            {
                return _intServerId;
            }
        }
    }



    public class ResultStringReceivedEventArgs : EventArgs
    {
        private String _strResult = "";

        public ResultStringReceivedEventArgs(
            String Result)
        {
            _strResult = Result;
        }

        public String Result
        {
            get
            {
                return _strResult;
            }
        }
    }



    public class NewUserReceivedEventArgs : EventArgs
    {
        private UserValidatorItem _uvi = null;

        public NewUserReceivedEventArgs(
            UserValidatorItem UVI)
        {
            _uvi = UVI;
        }

        public UserValidatorItem UVI
        {
            get
            {
                return _uvi;
            }
        }
    }



#region TrafficMonitor events
    public class SessionReceidedEventArgs : EventArgs
    {
        public string Request { get; set; }
        public string Response { get; set; }
        public SessionReceidedEventArgs(
            string strRequest,
            string strResponse)
        {
            Request = strRequest;
            Response = strResponse;
        }
    }

    
    
    public class ChatReceivedEventArgs : EventArgs
    {
        private int _intServerNr = 0;
        private Hashtable _htChat = null;

        public ChatReceivedEventArgs(
            int ServerNr,
            Hashtable Chat)
        {
            _intServerNr = ServerNr;
            _htChat = Chat;
        }

        public Hashtable Chat
        {
            get
            {
                return _htChat;
            }
        }

        public int ServerNr
        {
            get
            {
                return _intServerNr;
            }
        }
    }



    public class SeedReceivedEventArgs : EventArgs
    {
        private Hashtable _htSeed = null;
        private string _strSeedText = "";
        private int _intServerNr = 0;
        private string _strFbUId = "";
        private string _strDictionaryKey = "";

        public SeedReceivedEventArgs(
            int ServerNr,
            Hashtable Seed)
        {
            _intServerNr = ServerNr;
            _htSeed = Seed;
        }

        public SeedReceivedEventArgs(
            int ServerNr,
            Hashtable Seed,
            string SeedText,
            string DictionaryKey,
            string FbUId)
            : this(ServerNr, Seed)
        {
            _strSeedText = SeedText;
            _strDictionaryKey = DictionaryKey;
            _strFbUId = FbUId;
        }

        public Hashtable Seed { get { return _htSeed; } }

        public int ServerNr { get { return _intServerNr; } }

        public string SeedText { get { return _strSeedText; } }

        public string DictionaryKey { get { return _strDictionaryKey; } }

        public string FbUId { get { return _strFbUId; } }
    }



    public class UpdateSeedReceivedEventArgs : EventArgs
    {
        private Hashtable _htUpdateSeed = null;

        public UpdateSeedReceivedEventArgs(
            Hashtable UpdateSeed)
        {
            _htUpdateSeed = UpdateSeed;
        }

        public Hashtable UpdateSeed
        {
            get
            {
                return _htUpdateSeed;
            }
        }
    }
#endregion
}
